package com.hdsx.jxcsxm.party.server.impl;

import com.hdsx.dao.query.base.BaseOperate;
import com.hdsx.jxcsxm.party.bean.BaseBean;
import com.hdsx.jxcsxm.party.bean.PartyAccessBean;
import com.hdsx.jxcsxm.party.bean.Xmtjbean;
import com.hdsx.jxcsxm.party.server.PartyAccessServer;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 占贤银
 * time 2024/3/5 11:12
 * description 生命之灯因热情而点燃，生命之舟因拼搏而前行
 */
@Service
public class PartyAccessServerImpl extends BaseOperate implements PartyAccessServer {

    public PartyAccessServerImpl() {
        super("partyaccess", "myJdbc");
    }

    @Override
    public List<PartyAccessBean> queryAll() {
        List<PartyAccessBean> lists = queryList("queryAll");
        return lists;
    }

    @Override
    public boolean addZjdwForPlatform(List<BaseBean> params) {
        int rowNUm = insertBatch("addZjdwForPlatform", params);

        System.out.println("rowNum = " + rowNUm);
        if (rowNUm > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean addZjbfForPlatform(List<BaseBean> params) {
        int rowNUm = insertBatch("addZjbfForPlatform", params);

        System.out.println("rowNum = " + rowNUm);
        if (rowNUm > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean addXmtjForPlatform(List<Xmtjbean> tjParams) {
        int rowNUm = insertBatch("addXmtjForPlatform", tjParams);

        System.out.println("rowNum = " + rowNUm);
        if (rowNUm > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean addXmjyzjForPlatform(List<Xmtjbean> jyzjParams) {
        int rowNUm = insertBatch("addXmjyzjForPlatform", jyzjParams);

        System.out.println("rowNum = " + rowNUm);
        if (rowNUm > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean addXmzjtjForPlatform(List<BaseBean> zjtjParams) {
        int rowNUm = insertBatch("addXmzjtjForPlatform", zjtjParams);

        System.out.println("rowNum = " + rowNUm);
        if (rowNUm > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean addXmztForPlatform(List<Xmtjbean> xmztParams) {
        int rowNUm = insertBatch("addXmztForPlatform", xmztParams);

        System.out.println("rowNum = " + rowNUm);
        if (rowNUm > 0) {
            return true;
        }
        return false;
    }
}
